Attribute VB_Name = "modAdHandler"
' Generic Module for Overtech Technologies Programs


Sub LoadAd(ByVal Frm As Object, ByVal Purchased As String)
    ' Purpose:
    '   Display advertisement in default web browser if not purchased
    ' Precondition:
    '   - User has a web browser and is online
    ' Postcondition:
    '   - Advertisement displayed in default web browser
    
    If Purchased Then
        ' no ad to display
    Else
        Dim iret As Long
        iret = ShellExecute(Frm.hWnd, _
            vbNullString, _
            "http://www.overtechtechnologies.com/ads/full_page/?progName=Trainer_for_" & Replace(Game, " ", "_"), _
            vbNullString, _
            "c:\", _
            SW_SHOWNORMAL)
    End If
End Sub
